package com.glx.learn_spring.learn_spring_06_di_constructor.service.impl;


import com.glx.learn_spring.learn_spring_06_di_constructor.dao.IBookDao;
import com.glx.learn_spring.learn_spring_06_di_constructor.dao.IUserDao;
import com.glx.learn_spring.learn_spring_06_di_constructor.service.IBookService;

/**
 * @author haoli
 * @create 2022/11/30 17:45
 */
public class BookServiceImpl implements IBookService {

    private final IBookDao bookDao;
    private final IUserDao userDao;

    public BookServiceImpl(IBookDao bookDao, IUserDao userDao) {
        this.bookDao = bookDao;
        this.userDao = userDao;
    }

    @Override
    public void save() {
        System.out.println("bookService save ...");
        bookDao.save();
        userDao.save();
    }
}
